
<!DOCTYPE html>

<html lang="zh"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>心心向善 - 登&nbsp;&nbsp;&nbsp;录</title>
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta name="keywords" content="心心向善">
<meta name="description" content="心心向善">
<style type="text/css">
body { _behavior: url('');
}
input[type="ii"]{
    align-items: flex-start;
    text-align: center;
    cursor: default;
    color: buttontext;
    background-color: buttonface;
    box-sizing: border-box;
    padding: 2px 6px 3px;
    border-width: 2px;
    border-style: outset;
    border-color: buttonface;
    border-image: initial;
}
</style>
<link href="__PUBLIC__/Home/css/base.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/Home/css/home_header.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/Home/css/member_login.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/Home/css/font-awesome.min.css" rel="stylesheet" />
<link href="__PUBLIC__/Home/css/dialog.css" rel="stylesheet" type="text/css">

<script src="__PUBLIC__/Home/js/jquery.js"></script>
<script src="__PUBLIC__/Home/js/jquery.ui.js"></script>
<script src="__PUBLIC__/Home/js/common.js"></script>
<script src="__PUBLIC__/Home/js/jquery.validation.min.js"></script>
<script src="__PUBLIC__/Home/js/taglibs.js"></script>
<script type="text/javascript">
var URLSHOP = '/shop/index'; 
//alert(URLSHOP);
</script>


</head>
<body>
<div class="header-wrap">
  <header class="public-head-layout wrapper">
    <h1 class="site-logo">
		<a href="/">
			<volist name="service" id="vo">
				<eq name="vo.name" value="net_logo" >
					<if condition="$vo.value neq ''">
					<img src="{$vo.value}" class="pngFix">
					<else/>
					<img src="__PUBLIC__/Home/images/logo.png" class="pngFix">
					</if>
				</eq>
			</volist>
	    </a></h1>
            <div class="nc-regist-now">
    <span class="avatar"><img src="__PUBLIC__/Home/images/default_user_portrait.gif"></span>
    <span>Hi，欢迎来心心向善<br>还不是本站会员？立即<a href="/reguser.html" class="register">注册</a></span></div>
  </header>
</div>
<!-- PublicHeadLayout End -->

<div id="append_parent"></div>
<div id="ajaxwaitid"></div>


<div class="nc-login-layout">
  <div class="left-pic"><img src="__PUBLIC__/Home/images/4.jpg"  border="0"></div>
  <div class="nc-login">
  <div class="arrow"></div>
    <div class="nc-login-mode">
      <ul class="tabs-nav">
        <li><a href="#default">用户登录<i></i></a></li>
                <li><a href="#mobile">手机验证码登录<i></i></a></li>
              </ul>
      <div id="tabs_container" class="tabs-container">
        <div id="default" class="tabs-content">
          <form id="login_form" class="nc-login-form" >

            <dl>
              <dt>账&nbsp;&nbsp;&nbsp;号：</dt>
              <dd>
                <input type="text" class="text" autocomplete="off"  name="user_name" tipMsg="账号" id="user_name" placeholder="" >
              </dd>
            </dl>
            <dl>
              <dt>密&nbsp;&nbsp;&nbsp;码：</dt>
              <dd>
                <input type="password" class="text" name="password" autocomplete="off" tipMsg="6-20个大小写英文字母、符号或数字" id="password" placeholder="">
              </dd>
            </dl>
                        <div class="code-div mt15">
              <dl>
                <dt>验证码：</dt>
                <dd>
                  <input type="text" name="code" id="code" autocomplete="off" class="text w100" tipMsg="输入验证码"  size="10" value="" placeholder=""/>  			  
                </dd>
              </dl>
              <span><img src="{:U('login/verify')}" onclick="fleshVerify()" alt="如果看不到验证码,点击刷新验证码" id="verifyImg" ></span></div>
             <div class="handle-div">
            <span class="auto"><input type="checkbox" class="checkbox" name="auto_login" value="1">七天自动登录<em style="display: none;">请勿在公用电脑上使用</em></span>
            <a class="forget" href="">忘记密码？</a></div>
            <div class="submit-div">
			 
			  <button type="button" id="logoin" class="submit">登&nbsp;&nbsp;&nbsp;录</button>
            </div>
          </form>
        </div>
		
         <div id="mobile" class="tabs-content">
          <form id="post_form" method="post" class="nc-login-form" action="">
            <input type='hidden' name='formhash' value='' />            
			<input type="hidden" name="form_submit" value="ok" />
            <dl>
              <dt>手机号：</dt>
              <dd>
                <input name="phone" type="text" class="text" id="mphone" tipMsg="可填写已注册的手机号接收短信" autocomplete="off" value="" placeholder="" >              
              </dd>
            </dl>
            <div class="code-div">
              <dl>
                <dt>验证码：</dt>
                <dd>
                  <input type="text" name="code2"  class="text w100" tipMsg="输入验证码" placeholder="" id="mcode" size="10" />
                 
                </dd>
              </dl>
              <span><img src="{:U('login/verify')}" onclick="fleshVerify2()" alt="如果看不到验证码,点击刷新验证码" id="verifyImg2"> </span> </div>
            
            <div class="tiptext" id="sms_text">正确输入上方验证码后，点击<span> <a href="javascript:void(0);" onclick="get_sms_captcha('2')"><i class="icon-mobile-phone"></i>发送手机动态码</a></span>，查收短信将系统发送的“6位手机动态码”输入到下方验证后登录。</div>
            <dl>
              <dt>动态码：</dt>
              <dd>
                <input type="text" name="sms_captcha" autocomplete="off" class="text" tipMsg="输入6位手机动态码" id="sms_captcha" size="15"  placeholder="" />
                
              </dd>
            </dl>
            <div class="submit-div">
				 <button type="button" id="submit" class="submit">登&nbsp;&nbsp;&nbsp;录</button>
              </div>
          </form>
        </div>
              </div>
    </div>
    <div class="nc-login-api" id="demo-form-site">
          </div>
  </div>
  <div class="clear"></div>
</div>

<script>
$('input[tipMsg]').inputTipText({pwd:'password'});
  

	$("#logoin").click(function(){		
		var uname = $("#user_name").val();
		var password = $("#password").val();
		var code = $("#code").val();
		var sms_captcha = 1;
		
		if (!code) {
			$("#code").parents('dl:first').addClass('error');
		} else {
					
			$("#code").parents('dl:first').removeClass('error');
			tip_nick(uname,password,code,sms_captcha);
		}		
	});
	
	//手机登录	
	$("#submit").click(function(){

		var mphone = $("#mphone").val();
		var mcode = $("#mcode").val();
		var sms_captcha = $("#sms_captcha").val();
		var password = 0;

		//alert(mcode);
		if (!mcode) {
			//var SUBMIT = $("#logoin").attr('type','');	
			$("#mcode").parents('dl:first').addClass('error');
		} else {
			$("#mcode").parents('dl:first').removeClass('error');
			if (!sms_captcha) {
				$("#sms_captcha").parents('dl:first').addClass('error');
			} else {
				$("#sms_captcha").parents('dl:first').removeClass('error');
				tip_nick(mphone,password,mcode,sms_captcha);
			}
					
			
			
		}
		
	});
	


        //验证用户名和证件是否一致
        function tip_nick(uname,password,code,sms_captcha) {

            $.ajax({
                url:'/userlogin',
                data:{uname:uname,upwd:password,code:code,pm_sms:sms_captcha},
                type:'post',
                dataType:'json',
                success:function (e) {
					
					var html="";

                    if (e.error) {
							$(function(){
								timer(1);
							}); 
							html +='<div class="dialog_body" id="fwin_dialog" style="position: fixed; z-index: 1701; left: 400px; top: 288.5px;" initialized="true"><style type="text/css">object{visibility:hidden;}</style><h3 class="dialog_head"><span class="dialog_title"><span class="dialog_title_icon">提示信息</span></span><span class="dialog_close_button" id="fwin_dialog_close" onclick="hideMenu("fwin_dialog", "dialog")" title="关闭">X</span></h3><div class="eject_con"><div class="dialog_message_contents"><i class="alert_error"></i>'+e.error+'</div></div><div class="dialog_buttons_bar"><time class="countdown"><font id="second_show"> </font>秒后窗口关闭</time></div></div><div id="fwin_dialog_cover" style="position: absolute; z-index: 1700; top: 0px; left: 0px; width: 100%; height: 753px; background-color: transparent; opacity: 0;"></div>';
							$('#append_parent').html(html);
							setTimeout(function(){$('#append_parent').html('');},2000);				
													
					} else if(e.info) {
						location.href = URLSHOP;//location.href实现客户端页面的跳转 
					}
					
                }
            });
        }

</script>
<script type="text/javascript">
var intDiff = parseInt(60);//倒计时总秒数量
function timer(intDiff){
    window.setInterval(function(){
    var second=0;//时间默认值        
    if(intDiff > 0){
        second = intDiff;
    }
	
    $('#second_show').html(second);
    intDiff--;
    }, 1000);
} 

</script>
<script src="__PUBLIC__/Home/js/tabulous.js"></script>
<script>
$(function(){
	//初始化Input的灰色提示信息  
	//$('input[tipMsg]').inputTipText({pwd:'password'});
	//登录方式切换
	$('.nc-login-mode').tabulous({
		 effect: 'flip'//动画反转效果
	});	
		
    // 勾选自动登录显示隐藏文字
    $('input[name="auto_login"]').click(function(){
        if ($(this).attr('checked')){
            $(this).attr('checked', true).next().show();
        } else {
            $(this).attr('checked', false).next().hide();
        }
    });
});
</script>

<div id="footer" class="wrapper">
  <p><a href="/">首页</a>
                                                                      </p>
  Copyright 2016 <a href="/" target="_blank"><br></a></div><a href="/" target="_blank">




</a>
<script>
//重载验证码
function fleshVerify()
{
var timenow = new Date().getTime();
document.getElementById('verifyImg').src= '{:U("login/verify")}?'+timenow;
}
</script>	


<script>
//重载验证码
function fleshVerify2()
{
var timenow = new Date().getTime();
document.getElementById('verifyImg2').src= '{:U("login/verify")}?'+timenow;
}
</script>

</body></html>

	

